package com.example.demo.permission.menu.pojo;

import java.io.Serializable;
import java.util.List;

import com.example.demo.permission.role.pojo.Role;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

public class Menu implements Serializable {
	private Integer id;

	private String url;

	private String path;

	private String component;

	private String name;

	private String iconcls;

	private Boolean keepalive;

	private Boolean requireauth;

	private Integer parentid;

	private Boolean enabled;

	private List<Menu> children;

	private List<Role> roles;

	private MenuMeta meta;

	public List<Menu> getChildren() {
		return children;
	}

	public void setChildren(List<Menu> children) {
		this.children = children;
	}

	@JsonIgnore
	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

	public MenuMeta getMeta() {
		return meta;
	}

	public void setMeta(MenuMeta meta) {
		this.meta = meta;
	}

	private static final long serialVersionUID = 1L;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@JsonIgnore
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url == null ? null : url.trim();
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path == null ? null : path.trim();
	}

	@JsonFormat(shape = JsonFormat.Shape.OBJECT)
	public String getComponent() {
		return component;
	}

	public void setComponent(String component) {
		this.component = component == null ? null : component.trim();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public String getIconcls() {
		return iconcls;
	}

	public void setIconcls(String iconcls) {
		this.iconcls = iconcls == null ? null : iconcls.trim();
	}

	public Boolean getKeepalive() {
		return keepalive;
	}

	public void setKeepalive(Boolean keepalive) {
		this.keepalive = keepalive;
	}

	public Boolean getRequireauth() {
		return requireauth;
	}

	public void setRequireauth(Boolean requireauth) {
		this.requireauth = requireauth;
	}

	@JsonIgnore
	public Integer getParentid() {
		return parentid;
	}

	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
}